package com.jmj.patterns.demo0003;

import lombok.extern.slf4j.Slf4j;

/**
 * @author 良炫
 * @createTime 2022/3/4
 */
@Slf4j
public abstract class AbstractTemplateRoleService implements IRoleService {
    @Override
    public final void templateMethod() {
        individuationMethod1();
        hookMethod();
        individuationMethod2();
    }

    /**
     * 钩子方法，可以被重定义
     *
     * @author: 良炫
     * @date: 2022/3/4
     * @param: []
     * @return: void
     */
    @Override
    public void hookMethod() {
        log.info("AbstractTemplateRoleService hookMethod ");
    }
}
